home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-12 | 386 b | 22 lines | [TEXT/KAHL] |
- void PutChar(char c);
- void PutText(const char* s, int len );
- void __DecToText (unsigned long dec, char* str );
-
- void PutSDec(signed long i)
- {
- Boolean isNeg;
- int n = 0;
- char* str = "0000000000";
-
- if ( isNeg = ( i < 0 ) )
- i = -i;
-
- __DecToText (i, str );
-
- while ( str[n] == '0' && n<9 )
- n++;
-
- PutChar( '#' );
- if ( isNeg ) PutChar( '-' );
- PutText( &str[n], 10-n );
- }